"""
@author: zjc
@file: lianxi.py
@time: 2022/10/28 17:29
"""
import datetime
per_id=input("请输入您的身份证号:")
if per_id.isdigit() and len(per_id)==18:
    birth_year=int(per_id[6:10])
    today_year=datetime.date.today().year
    age=today_year-birth_year
    if 0<=age<18:
        print("未成年")
    elif 18<=age<=50:
        print("青壮年")
    elif age>50:
        print("老年")
    else:
        print("你是终结者吧！")
else:
    print("您输入的身份证有误，请重新输入")
# import random
# game=[]
# i=1
# while i<=12:
#     game1=str(random.randint(0,1))
#     game.append(game1)
#     i+=1
# n=1
# game_str=''.join(game)
# while n<5:
#     index=random.randint(0,11)
#     if game_str[index]=='1':
#         print("灯亮")
#     else:
#         print("灯灭")
#     n+=1